package Computer.Main;

public class LongWord implements DataWord {
	private Long value;
	
	public LongWord(long i) {
		this.value = i;
	}

	@Override
	public String toString() {
		return Long.toString(value);
	}
	@Override	
	public DataWord add(DataWord other) {
		return new LongWord(this.value + ((LongWord)other).value);
	}

	@Override
	public DataWord mul(DataWord other) {
		return new LongWord(this.value * ((LongWord)other).value);
	}
	
	public void cpy(DataWord dword) {
			this.value = ((LongWord)dword).value;
	}

	@Override
	public DataWord getWord(Memory memory) {
		return this;
	}

	@Override
	public boolean equals(DataWord other) {
		if(this.value == ((LongWord)other).value) {
			return true;
		}
		return false;
	}

}
